<!DOCTYPE html>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <title>智能备课系统</title>
    <meta name="description" content="智能备课系统">
    <link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
    <link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
    <link href="../static/css/login.min.css" th:href="@{/css/login.min.css}" rel="stylesheet"/>
    <link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.5.0}" rel="stylesheet"/>
    <!-- 360浏览器急速模式 -->
    <meta name="renderer" content="webkit">
    <!-- 避免IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="shortcut icon" href="../static/favicon.ico" th:href="@{favicon.ico}"/>
    <style type="text/css">label.error { position:inherit;  }</style>
    <script>
        if(window.top!==window.self){alert('未登录或登录超时。请重新登录');window.top.location=window.location};
    </script>
</head>
<body class="signin">
    <!--<div class="signinpanel">
        <div class="row">
           &lt;!&ndash; <div class="col-sm-5 col-sm-offset-3">
                <form id="signupForm" autocomplete="off">
                    <h4 class="no-margins">登录</h4>
                    <input type="text"     name="username" class="form-control uname"     placeholder="用户名"   />
                    <input type="password" name="password" class="form-control pword"     placeholder="密码"    />
                    <div class="l-captcha" id="luotest_response"  name = "luotest_response" data-site-key="b6668457407a95ef067ef2bd57256869" data-width="100%" style="margin-bottom: 15px;margin-top: 15px" hidden></div>
                    <button class="btn btn-success btn-block" id="btnSubmit" data-loading="正在验证登录，请稍后...">登录</button>
                </form>
            </div>&ndash;&gt;

        </div>
    </div>-->
    <div class="login-wrap login-flex login-ac login-jc">
        <div class="login-box">
            <div class="login-title">
                <img src="">
                <p>智能备课系统</p>
            </div>

            <form id="signupForm" autocomplete="off">
                <div class="input-item flex">
                    <label for="login_input_user" class="flex ac jc">
                        <img src="https://oies.oss-cn-shanghai.aliyuncs.com/OTO/label-user.png">
                    </label>
                    <input id="login_input_user" type="text" name="username" placeholder="账号" class="fg">
                </div>

                <div class="input-item flex">
                    <label for="login_input_pwd" class="flex ac jc">
                        <img src="https://oies.oss-cn-shanghai.aliyuncs.com/OTO/label-pwd.png">
                    </label>
                    <input id="login_input_pwd" type="password" name="password"  placeholder="密码" class="fg">
                </div>
                <div class="input-item flex" id="phoneCodeDiv" style="display: none">
                    <input id="phoneCode" type="text" name="phoneCode" placeholder="手机验证码" class="fg" maxlength="6">
                    <input type="button" style="color: #a8a8a8" value="获取验证码" id="sendCodeBtn" onclick="sendCode(true)"/>
                </div>
                <div id="auth_div" class="input-item flex" style="overflow: initial; background: none; height: auto;margin-top: 0" hidden>
                    <div class="l-captcha" id="luotest_response"  name = "luotest_response" data-site-key="b6668457407a95ef067ef2bd57256869" data-width="100%"  style="border-radius: 10px;overflow: hidden;height: 50px;margin-top: 23px;width: 100%" hidden></div>
                </div>
             <!--   <div class="input-item flex" id="luotest_response" name = "luotest_response" data-site-key="b6668457407a95ef067ef2bd57256869" data-width="100%"  hidden>
                    <label for="login_input_safe" class="flex ac jc">
                        <img src="https://oies.oss-cn-shanghai.aliyuncs.com/OTO/label-safe.png">
                    </label>
                    <input id="login_input_safe" type="text" placeholder="点击此处进行验证" class="fg">
                </div>-->
                <input type="submit" value="登录" id="btnSubmit" data-loading="正在验证登录，请稍后..."/>

                <div class="register-link">
                    <a href="javascript:void(0);" onclick="openRegisterModal()">注册新账号</a>
                </div>
            </form>
<!--            <div class="register-link">-->
<!--                <a href="javascript:void(0);" onclick="openRegisterModal()">注册新账号</a>-->
<!--            </div>-->
            <!-- 注册弹窗 -->
            <div id="registerModal" style="display:none;" class="modal fade" tabindex="-1" role="dialog">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title">注册</h4>
                        </div>
                        <div class="modal-body">
                            <!-- 注册表单将加载到这里 -->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
<script th:inline="javascript"> var ctx = [[@{/}]]; var captchaType = [[${captchaType}]]; </script>


<!-- 全局js -->
<script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
<script src="../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
<!-- 验证插件 -->
<script src="../static/ajax/libs/validate/jquery.validate.min.js" th:src="@{/ajax/libs/validate/jquery.validate.min.js}"></script>
<script src="../static/ajax/libs/validate/messages_zh.min.js" th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.5.0}"></script>
<script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
<script type="text/javascript">
    let time =0;
        function initIdentifyingCode() {
            if(window.location.host.indexOf('jsylvip.com')>0){
                document.getElementById('luotest_response').hidden = false;
                document.getElementById('auth_div').hidden = false;
                var c = document.createElement('script');
                c.type = 'text/javascript';
                c.async = true;
                c.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'captcha.luosimao.com/static/dist/captcha.js?v=201610101436';
                var s = document.getElementsByTagName('script')[0];
                s.parentNode.insertBefore(c, s);
            }
        }
        $(function () {
            initIdentifyingCode();
        });

    function openRegisterModal() {
        $('#registerModal .modal-body').load(ctx + 'register', function() {
            $('#registerModal').modal('show');
        });
    }
        function sendCode(flag){
            var username = $.common.trim($("input[name='username']").val());
            if(time==0){
                $("#sendCodeBtn").val("获取验证码");
                $("#sendCodeBtn").attr("disabled",false);
                if(flag){
                    $("#sendCodeBtn").attr("disabled",true);
                    $.ajax({
                        url: ctx + "sendSmsCode?userName="+username,
                        type:'GET',
                        success:function (data) {
                            if(data. resp_code === 200){
                                top.layer.msg("发送成功！");
                                time =60;
                                sendCode();
                            }else {
                                layer.msg("请稍后再试");
                                $("#sendCodeBtn").removeAttr("disabled");
                            }
                        }
                    });
                }
                return false;
            }else {
                $("#sendCodeBtn").val("重新发送"+time);
                $("#sendCodeBtn").removeAttr("disabled");
                time--;
            }
            setTimeout(function () {
                sendCode(false);
            },1000)

        }
 </script>
</body>
</html>
